package com.ruoyi.user.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.manage.domain.DonationType;
import com.ruoyi.manage.service.IDonationTypeService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author ZhangZhongGen
 */
@RestController
@Slf4j
@RequestMapping("/userWeixin/donationType")
public class UserDonationTypeController extends BaseController {
    @Autowired
    private IDonationTypeService donationTypeService;

    /**
     * 查询捐赠物种类列表
     */
    @ApiOperation("查询捐赠物种类列表")
    @GetMapping("/list")
    public TableDataInfo list(DonationType donationType)
    {
        List<DonationType> list = donationTypeService.selectDonationTypeList(donationType);
        return getDataTable(list);
    }
}
